﻿<%@ Page Title="Business" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" EnableEventValidation="false" CodeBehind="Companies.aspx.cs" Inherits="CompanyManagement.management.Companies" ResponseEncoding="UTF-8" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        function onRequestStart(sender, args) {
            if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0) {
                args.set_enableAjax(false);
            }
        }
    </script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="SiteMapContent" runat="server">
    <div id="breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="icon-home"></i>
                <a href="#">Trang chủ</a>

                <span class="divider">
                    <i class="icon-angle-right"></i>
                </span>
            </li>
            <li class="active">Quản lý doanh nghiệp</li>
        </ul>
        <!--.breadcrumb-->

        <div id="nav-search">
        </div>
        <!--#nav-search-->
    </div>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h3 class="lighter">
        <i class="icon-rss orange"></i>
        Quản lý doanh nghiệp
    </h3>

    <div class="alert">
        <h4 class="lighter">
            <i class="icon-pencil"></i>
            Nhập doanh nghiệp từ file Excel</h4>
        <div class="row-fluid">
            <label>
                Chọn file Excel:</label>
            <asp:FileUpload ID="FileUpload1" runat="server" />
            <asp:LinkButton ID="linkbtImport" runat="server" class="btn btn-mini btn-success"
                ToolTip="Import Excel" OnClick="linkbtImport_Click">Import Excel</asp:LinkButton>
            <span style="font-weight: bold">Lưu ý:</span>
            Vui lòng chọn file Excel cần Import và file Excel phải đảm bảo đúng định dạng(.xls)
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Download/CompanyTemplate.xls"> Tải Về</asp:HyperLink>
            <div class="alert alert-error" runat="server" id="alertExisted" visible="false">
                Danh sách các mã thẻ đã tồn tại trong hệ thống.
            </div>
            <div class="clearfix"></div>
            <telerik:RadGrid ID="RadGrid2" runat="server" CellSpacing="0" GridLines="None" Skin="Telerik"
                AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" MasterTableView-ShowHeadersWhenNoRecords="false">
                <ExportSettings ExportOnlyData="True">
                    <Excel Format="Biff" />
                </ExportSettings>
                <MasterTableView CommandItemDisplay="Top">
                    <CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="False"
                        ShowExportToExcelButton="False"></CommandItemSettings>
                    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="Name"
                            HeaderText="Tên Công ty" SortExpression="Name" UniqueName="Name" ReadOnly="true">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Address"
                            HeaderText="Địa chỉ" SortExpression="Address" UniqueName="Address">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="WardCode"
                            HeaderText="Xã" SortExpression="WardCode" UniqueName="WardCode">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="DistrictCode"
                            HeaderText="Huyện" SortExpression="DistrictCode" UniqueName="DistrictCode">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Phone"
                            HeaderText="Số ĐT" SortExpression="Phone" UniqueName="Phone">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CompanyNo"
                            HeaderText="ĐKKD (CompanyNo)" SortExpression="CompanyNo" UniqueName="CompanyNo">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TaxCode"
                            HeaderText="Mã số thuế" SortExpression="TaxCode" UniqueName="TaxCode">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Capital" DataFormatString="{0:0,0}"
                            HeaderText="Vốn" SortExpression="Capital" UniqueName="Capital">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="MSN1"
                            HeaderText="MSN1" SortExpression="MSN1" UniqueName="MSN1">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="MSN2"
                            HeaderText="MSN2" SortExpression="MSN2" UniqueName="MSN2">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="MSN3"
                            HeaderText="MSN3" SortExpression="MSN3" UniqueName="MSN3">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="MSN4"
                            HeaderText="MSN4" SortExpression="MSN4" UniqueName="MSN4">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="BusinessReg"
                            HeaderText="ĐKKD" SortExpression="BusinessReg" UniqueName="BusinessReg">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>

        </div>
    </div>
    <telerik:RadCodeBlock ID="DoubleClick" runat="server">
        <script type="text/javascript">
            function RowDblClick(sender, eventArgs) {
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
            }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="false" Skin="WebBlue" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All"
        EnableRoundedCorners="false" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" EnableAJAX="true" runat="server">
        <ClientEvents OnRequestStart="onRequestStart"></ClientEvents>
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="success"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="error"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <div class="alert alert-block alert-success" id="success" runat="server" visible="false">
        <asp:Literal ID="ltrSuccess" runat="server"></asp:Literal>
    </div>
    <div class="alert alert-block alert-error" id="error" runat="server" visible="false">
        <asp:Literal ID="ltrError" runat="server"></asp:Literal>
    </div>
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="false" AllowAutomaticInserts="false" PageSize="20"
        AllowAutomaticUpdates="false" AllowPaging="True" AllowSorting="True" CellSpacing="0"
        AllowFilteringByColumn="True" FilterMenu-EnableTextHTMLEncoding="True" FilterMenu-AppendDataBoundItems="True"
        GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCreated="RadGrid1_ItemCreated" OnEditCommand="RadGrid1_EditCommand" OnInsertCommand="RadGrid1_InsertCommand" OnDeleteCommand="RadGrid1_DeleteCommand" OnUpdateCommand="RadGrid1_UpdateCommand" OnExcelMLWorkBookCreated="RadGrid1_ExcelMLWorkBookCreated">
        <ExportSettings ExportOnlyData="True" IgnorePaging="True" FileName="CompanyReport">
            <Excel Format="Biff" />
        </ExportSettings>
        <ClientSettings>
            <Selecting AllowRowSelect="true"></Selecting>
            <Scrolling AllowScroll="True" ScrollHeight="480px"  UseStaticHeaders="true" FrozenColumnsCount="2"></Scrolling>
            <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataKeyNames="ID"
            InsertItemPageIndexAction="ShowItemOnFirstPage" EditMode="PopUp" TableLayout="Fixed">
            <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="Thêm mới"
                ExportToExcelText="Xuất Excel" RefreshText="Làm mới" ShowExportToExcelButton="True"
                ShowAddNewRecordButton="True"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditText="Sửa" CancelText="Hủy" UpdateText="Lưu thay đổi">
                    <HeaderStyle Width="35px" />
                    <ItemStyle Width="35px" />
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Xóa" ConfirmTitle="Xác nhận" ConfirmDialogType="RadWindow" ConfirmTextFormatString="Bạn có muốn xóa doanh nghiệp:'{0}' không?" 
                    ConfirmTextFields="Name" CommandName="Delete" ConfirmDialogWidth="350px" ConfirmDialogHeight="140px">
                    <HeaderStyle Width="35px" />
                    <ItemStyle Width="35px" />
                </telerik:GridButtonColumn>
                <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" AllowFiltering="false"
                    HeaderText="ID" Visible="false" SortExpression="ID" UniqueName="ID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name"
                    HeaderText="Tên Công ty" SortExpression="Name" UniqueName="Name">
                    <HeaderStyle Width="200px" />
                    <ItemStyle Width="200px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="NameFilter"
                    HeaderText="Tên Công ty" SortExpression="NameFilter" UniqueName="NameFilter" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Address"
                    HeaderText="Địa chỉ" SortExpression="Address" UniqueName="Address">
                    <HeaderStyle Width="180px" />
                    <ItemStyle Width="180px" />
                </telerik:GridBoundColumn>
                <%--<telerik:GridDropDownColumn DataField="WardCode" DataSourceID="EntityDataSource1" HeaderText="Xã"
                    ListTextField="WardCode" ListValueField="WardCode" UniqueName="WardCode" ColumnEditorID="GridDropDownColumnEditor1">
                    <FilterTemplate>
                        <telerik:RadComboBox ID="RadComboBoxWard" DataSourceID="EntityDataSource1" DataTextField="Name"
                            DataValueField="Code" Height="50px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("WardCode").CurrentFilterValue %>'
                            runat="server" OnClientSelectedIndexChanged="WardIndexChanged">
                            <Items>
                                <telerik:RadComboBoxItem Text="All" />
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
                            <script type="text/javascript">
                                function WardIndexChanged(sender, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                    tableView.filter("WardCode", args.get_item().get_value(), "EqualTo");
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridDropDownColumn>--%>
                <telerik:GridBoundColumn DataField="WardCode" AllowFiltering="false"
                    HeaderText="Xã" SortExpression="WardCode" UniqueName="WardCode">
                    <HeaderStyle Width="60px" />
                    <ItemStyle Width="60px" />
                </telerik:GridBoundColumn>
                <%--<telerik:GridDropDownColumn DataField="DistrictCode" DataSourceID="EntityDataSource2" HeaderText="Huyện"
                    ListTextField="Name" ListValueField="Code" UniqueName="DistrictCode" ColumnEditorID="GridDropDownColumnEditor1">
                    <FilterTemplate>
                        <telerik:RadComboBox ID="RadComboBoxDistrict" DataSourceID="EntityDataSource2" DataTextField="Name"
                            DataValueField="Code" Height="50px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("DistrictCode").CurrentFilterValue %>'
                            runat="server" OnClientSelectedIndexChanged="DistrictIndexChanged">
                            <Items>
                                <telerik:RadComboBoxItem Text="All" />
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                            <script type="text/javascript">
                                function DistrictIndexChanged(sender, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                    tableView.filter("DistrictCode", args.get_item().get_value(), "EqualTo");
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridDropDownColumn>--%>
                <telerik:GridBoundColumn DataField="DistrictCode" AllowFiltering="false"
                    HeaderText="Huyện" SortExpression="DistrictCode" UniqueName="DistrictCode">
                    <HeaderStyle Width="60px" />
                    <ItemStyle Width="60px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Phone" AllowFiltering="false"
                    HeaderText="Số ĐT" SortExpression="Phone" UniqueName="Phone">
                    <HeaderStyle Width="80px" />
                    <ItemStyle Width="80px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CompanyCreateDated" AllowFiltering="false"
                    HeaderText="Ngày thành lập" SortExpression="CompanyCreateDated" UniqueName="CompanyCreateDated">
                    <HeaderStyle Width="80px" />
                    <ItemStyle Width="80px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CompanyNo"
                    HeaderText="ĐKKD (CompanyNo)" SortExpression="CompanyNo" UniqueName="CompanyNo">
                    <HeaderStyle Width="120px" />
                    <ItemStyle Width="120px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="TaxCode" AllowFiltering="false"
                    HeaderText="Mã số thuế" SortExpression="TaxCode" UniqueName="TaxCode">
                    <ItemStyle Width="80px" />
                    <HeaderStyle Width="80px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Capital" DataFormatString="{0:0,0}" AllowFiltering="false"
                    HeaderText="Vốn" SortExpression="Capital" UniqueName="Capital">
                    <ItemStyle Width="100px" />
                    <HeaderStyle Width="100px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MSN1" AllowFiltering="false"
                    HeaderText="MSN1" SortExpression="MSN1" UniqueName="MSN1">
                    <ItemStyle Width="60px" />
                    <HeaderStyle Width="60px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MSN2" AllowFiltering="false"
                    HeaderText="MSN2" SortExpression="MSN2" UniqueName="MSN2">
                    <ItemStyle Width="60px" />
                    <HeaderStyle Width="60px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MSN3" AllowFiltering="false"
                    HeaderText="MSN3" SortExpression="MSN3" UniqueName="MSN3">
                    <ItemStyle Width="60px" />
                    <HeaderStyle Width="60px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MSN4" AllowFiltering="false"
                    HeaderText="MSN4" SortExpression="MSN4" UniqueName="MSN4">
                    <ItemStyle Width="60px" />
                    <HeaderStyle Width="60px" />
                </telerik:GridBoundColumn>
                <%--<telerik:GridBoundColumn DataField="DirectorName"
                    HeaderText="Tên giám đốc" SortExpression="DirectorName" UniqueName="DirectorName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="TradingName"
                    HeaderText="Tên giao dịch" SortExpression="TradingName" UniqueName="TradingName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Abbreviation"
                    HeaderText="Tên viết tắt" SortExpression="Abbreviation" UniqueName="Abbreviation">
                </telerik:GridBoundColumn>--%>
                <telerik:GridBoundColumn DataField="BusinessReg" AllowFiltering="false"
                    HeaderText="ĐKKD" SortExpression="BusinessReg" UniqueName="BusinessReg">
                    <ItemStyle Width="80px" />
                    <HeaderStyle Width="80px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="StrStatus" HeaderText="Status" SortExpression="StrStatus"
                    UniqueName="StrStatus">
                    <ItemStyle Width="140px" />
                    <HeaderStyle Width="140px" />
                    <FilterTemplate>
                        <telerik:RadComboBox ID="RadComboBoxStatus" DataSource='<%# GetStatus() %>' DataTextField="StrStatus" DataValueField="StrStatus" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("StrStatus").CurrentFilterValue %>'
                            runat="server" OnClientSelectedIndexChanged="StatusIndexChanged">
                            <Items>
                                <telerik:RadComboBoxItem Text="All" />
                                <%--<telerik:RadComboBoxItem Text="Đang hoạt động" Value="1" />
                                <telerik:RadComboBoxItem Text="Giải thể" Value="2" />
                                <telerik:RadComboBoxItem Text="Chuyển lĩnh vực" Value="3" />--%>
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadScriptBlock ID="StatusScript" runat="server">
                            <script type="text/javascript">
                                function StatusIndexChanged(sender, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                    tableView.filter("StrStatus", args.get_item().get_value(), "EqualTo");
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridBoundColumn>
                <%--<telerik:GridBoundColumn DataField="CompanyTypeCode"
                    HeaderText="Loại hình" SortExpression="CompanyTypeCode" UniqueName="CompanyTypeCode">
                </telerik:GridBoundColumn>--%>
                <telerik:GridTemplateColumn DataField="CompanyTypeCode" HeaderText="Loại hình"
                    UniqueName="CompanyTypeCode">
                    <ItemStyle Width="180px" />
                    <HeaderStyle Width="180px" />
                    <FilterTemplate>
                        <telerik:RadComboBox ID="RadComboBoxType" DataSourceID="EntityDataSource3" DataTextField="Name"
                            DataValueField="Code" Height="150px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("CompanyTypeCode").CurrentFilterValue %>'
                            runat="server" OnClientSelectedIndexChanged="TypeIndexChanged">
                            <Items>
                                <telerik:RadComboBoxItem Text="All" />
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadScriptBlock ID="CompanyTypeScript" runat="server">
                            <script type="text/javascript">
                                function TypeIndexChanged(sender, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                    tableView.filter("CompanyTypeCode", args.get_item().get_value(), "EqualTo");
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="CompanyTypeCode" runat="server" Text='<%# Eval("CompanyTypeCode") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="DissolvedDate" AllowFiltering="false"
                    HeaderText="Ngày giải thể (Nếu có)" SortExpression="DissolvedDate" UniqueName="DissolvedDate">
                    <HeaderStyle Width="80px" /> 
                    <ItemStyle Width="80px" />
                    <FooterStyle Width="80px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ReasionDissolved" AllowFiltering="false"
                    HeaderText="Lý do (Nếu có)" SortExpression="ReasionDissolved" UniqueName="ReasionDissolved">
                    <HeaderStyle Width="100px" /> 
                    <ItemStyle Width="100px" />
                    <FooterStyle Width="100px" />
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings UserControlName="/usercontrol/UcEditCompany.ascx" EditFormType="WebUserControl" InsertCaption="Thêm mới doanh nghiệp" CaptionFormatString="Sửa thông tin doanh nghiệp: {0}" CaptionDataField="ID">
                <PopUpSettings Modal="True" Width="900px" Height="550px"></PopUpSettings>
            </EditFormSettings>
        </MasterTableView>
        <ValidationSettings CommandsToValidate="PerformInsert,Update" />
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=CompanyEntities" DefaultContainerName="CompanyEntities"
        EnableFlattening="False" EntitySetName="Wards" Select="it.[Code], it.[Name]" Where="it.[IsActive] = true">
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=CompanyEntities" DefaultContainerName="CompanyEntities"
        EnableFlattening="False" EntitySetName="Districts" Select="it.[Code], it.[Name]" Where="it.[IsActive] = true">
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="EntityDataSource3" runat="server" ConnectionString="name=CompanyEntities" DefaultContainerName="CompanyEntities"
        EnableFlattening="False" EntitySetName="CompanyTypes" Select="it.[Code], it.[Name]" Where="it.[IsActive] = true">
    </asp:EntityDataSource>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    </telerik:RadWindowManager>
</asp:Content>
